﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MobilnyDostawca.Enums;
using MobilnyDostawca.Repositories;
using MobilnyDostawca.ViewModels;

namespace MobilnyDostawca.Controllers
{
    [Authorize]
    public class StatisticController : Controller
    {
        //
        // GET: /Statistic/

        public ActionResult Index()
        {
            //return View(Repository.GetStatystykaViewModelWithFilterConditions(model));
            return View(Repository.LoadStatystykaViewModel());
        }

        // POST: /Parcel/
        [HttpPost]
        public ActionResult Index(StatystykiViewModel model)
        {
            // FilterStatistics
            return View(Repository.GetStatystykaViewModelWithFilterConditions(model));
            //return RedirectToAction("Index", );
        }
    }
}
